home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Add-ons / CAfterDark20 / ADGMTypes.h next >
Encoding:
C/C++ Source or Header  |  1990-12-02  |  2.7 KB  |  85 lines  |  [TEXT/KAHL]

  1. #define _H_ADGMTypes
  2.  
  3. /*
  4.  * © Copyright Jeff Francis 1990
  5.  * All rights reserved
  6.  *
  7.  * This interface is based on material copyrighted
  8.  * by Berkeley Systems, Inc. 1989-1990.
  9.  *
  10.  * $Id$
  11.  *
  12.  * Description - Contains enumerations, typedefs and defines for a
  13.  * 'ADgm' code resource.  Page references are to "After Dark
  14.  * Programmer's Manual." 
  15.  *
  16.  */
  17.  
  18. #include <QuickDraw.h>
  19. #include <SoundMgr.h>
  20.  
  21. typedef enum {                /* Page 17 - More About Messages */
  22.     kInitialize = 0,            /* Page 17 */
  23.     kBlank = 2,                    /* Page 18 */
  24.     kDrawFrame = 3,                /* Page 18 */
  25.     kClose = 1,                    /* Page 18 */
  26.     kButtonMessage = 8,            /* Page 18 */
  27.     kModuleSelected = 4,        /* Page 18 */
  28.     kDoHelp = 5                    /* Page 18 */
  29. };
  30. typedef short eMessage;
  31.  
  32. typedef enum {                    /* Page 18 - Graphics Module Return Values */
  33.     kModuleError = -1,            /* Page 18 */
  34.     kRestartMe = 1,                /* Page 19 */
  35.     kImDone = 2,                /* Page 19 */
  36.     kRefreshResources = 3        /* Page 19 */
  37. } eReturn;
  38.  
  39. typedef struct MonitorData {    /* Page 20 - monitors */
  40.     Rect    bounds;                    /* Page 20 */
  41.     Boolean    synchFlag;                /* Page 20 */
  42.     char    curDepth;                /* Page 20 */
  43. } MonitorData, *MonitorDataPtr, **MonitorDataHdl;
  44.  
  45. typedef struct MonitorsInfo {    /* Page 20 - monitors */
  46.     short        monitorCount;        /* Page 20 */
  47.     MonitorData    monitorList[1];        /* Page 20 */
  48. } MonitorsInfo, *MonitorsInfoPtr, **MonitorsInfoHdl;
  49.  
  50.                                 /* Page 20 - systemConfig */
  51. #define cqdAvail        0x0001        /* Page 20 */
  52. #define anyMultibit        0x0002        /* Page 20 */
  53. #define allMultibit        0x0004        /* Page 20 */
  54. #define anyColor        0x0008        /* Page 20 */
  55. #define allColor        0x0010        /* Page 20 */
  56. #define anyCLUTDevice    0x0020        /* Page 20 */
  57. #define allCLUTDevice    0x0040        /* Page 20 */
  58. #define allCanDim        0x0080        /* Page 20 */
  59. #define mainMonCanDim    0x0100        /* Page 20 */
  60. #define soundAvail        0x8000        /* Page 20 */
  61.  
  62. typedef struct QDGlobals {        /* Page 21 - gdGlobalsCopy */
  63.     GrafPtr        qdThePort;            /* Page 21 */
  64.     Pattern        qdWhite;            /* Page 21 */
  65.     Pattern        qdBlack;            /* Page 21 */
  66.     Pattern        qdGray;                /* Page 21 */
  67.     Pattern        qdLtGray;            /* Page 21 */
  68.     Pattern        qdDkGray;            /* Page 21 */
  69.     Cursor        qdArrow;            /* Page 21 */
  70.     BitMap        qdScreenBits;        /* Page 21 */
  71.     long        qdRandSeed;            /* Page 21 */
  72. } QDGlobals, *QDGlobalsPtr, **QDGlobalsHdl;
  73.  
  74. typedef struct GMParamBlock {    /* Page 19 - Graphics Modules Parameters */
  75.     short                controlValues[4];    /* Page 19 */
  76.     MonitorsInfoPtr        monitors;            /* Page 20 */
  77.     Boolean                colorQDAvail;        /* Page 20 */
  78.     short                systemConfig;        /* Page 20 */
  79.     QDGlobalsPtr        qdGlobalsCopy;        /* Page 21 */
  80.     short                brightness;            /* Page 21 */
  81.     Rect                demoRect;            /* Page 21 */
  82.     StringPtr            errorMessage;        /* Page 21 */
  83.     SndChannelPtr        sndChannel;            /* Page 21 */
  84.     short                adVersion;            /* Page 22 */
  85. } GMParamBlock, *GMParamBlockPtr, **GMParamBlockHdl;